package fr.vvins.core.order.entity;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import fr.vvins.core.dao.EntityImpl;

/**
 * ShippingItem entity
 */
@Entity
@Table(schema="vvins", name="VV_SHIPPING_ITEM")
public class ShippingItem extends EntityImpl implements Serializable {

	private static final long serialVersionUID = 7134342928503747289L;
	@Id
	@GeneratedValue
	@Column(name="ID")
	private Integer id;
	@ManyToOne
	@JoinColumn(name="ORDER_ID")
	private Order order;
	@ManyToOne
	@JoinColumn(name="SHIPPING_METHOD_ID")
	private ShippingMethod shippingMethod;
	@ManyToOne
	@JoinColumn(name="COMMERCE_ITEM_ID")
	private CommerceItem commerceItem;
	@Basic
	@Column(name="STATUS")
	private Integer status;
	@Basic
	@Column(name="DATA")
	private String data;

	public ShippingItem() {
	}

	public ShippingItem(Integer id, Order order, ShippingMethod shippingMethod,
			CommerceItem commerceItem, Integer status, String data) {
		super();
		this.id = id;
		this.order = order;
		this.shippingMethod = shippingMethod;
		this.commerceItem = commerceItem;
		this.status = status;
		this.data = data;
	}

	public ShippingItem(Integer id) {
		this.id = id;
	}

	@Override
	public Integer getId() {
		return id;
	}

	@Override
	public void setId(Integer id) {
		this.id = id;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public ShippingMethod getShippingMethod() {
		return shippingMethod;
	}

	public void setShippingMethod(ShippingMethod shippingMethod) {
		this.shippingMethod = shippingMethod;
	}

	public CommerceItem getCommerceItem() {
		return commerceItem;
	}

	public void setCommerceItem(CommerceItem commerceItem) {
		this.commerceItem = commerceItem;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	
}
